/** 
 * Description:帮助类，方便统一做Request相关的操作
 * Date:2013-1-3
 * Author:Along	
*/
package com.community.shopping.util;
import javax.servlet.http.HttpServletRequest;

public class RequestHelp{
	
	public static final String SESSION_SHOPID="session_shopid";
	
	/**
	 * 从session中获取店铺ID，用作区域隔离
	 * @param request
	 * @return
	 */
	public static Integer getShopId(HttpServletRequest request)
	{
		String shopId="1";
		if(request.getSession().getAttribute(SESSION_SHOPID)!=null)
		{
			shopId=request.getSession().getAttribute(SESSION_SHOPID).toString();
		}
		return Integer.parseInt(shopId);
	}
	
}